package com.itfreer.bpm.modelDeployer;

import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.itfreer.bpm.messager.BpmMessage;
import com.itfreer.bpm.model.service.IModelDeployService;

/**
 * 定义标准的服务部署接口
 */
@Component(value="modelmanager")
@Path("/bpm/model")
public class RestModelDeployerService {
	
	@Autowired
	IModelDeployService servie;
	@SuppressWarnings({ "rawtypes", "unchecked" })
	@POST
	@Path("/deployModel/{id:.+}")
	@Produces(javax.ws.rs.core.MediaType.APPLICATION_JSON)
	public BpmMessage deployModel(@PathParam("id") String key){
		return servie.deployModel(key);
	}
}
